###########################################################################
# $Id: conceptDataManager.p 21 2009-05-06 10:36:45Z donbeave $
###########################################################################

@CLASS
conceptDataManager

@USE
pf/types/pfClass.p

@BASE
pfClass

@OPTIONS
locals

#----- Constructor -----

@create[hshOptions]
## hshOptions.concept
## hshOptions.conceptOptions
  ^cleanMethodArgument[hshOptions]

  $_createOptions[$hshOptions]

  ^if(def $hshOptions.concept && $hshOptions.concept is conceptModule){
    $self._concept[$hshOptions.concept]
  }{
     $self._concept[]
   }

#----- Public -----

@addObject[objItem]
  ^_abstractMethod[]

@addObjectText[objTextItem]
  ^_abstractMethod[]

@editObject[objItem]
  ^_abstractMethod[]

@editObjectText[objItem]
  ^_abstractMethod[]

@removeObject[objItem]
  ^_abstractMethod[]

#----- Properties -----

@GET_CONCEPT[]
  ^if(!def $self._concept){
    $self._concept[^conceptFactory[$_createOptions.conceptOptions]]
  }
  $result[$_concept]

@GET_STORAGE[]
  $result[$CONCEPT.STORAGE]

@GET_isTreeBlocksSupported[]
  $result($CONCEPT.isTreeBlocksSupported)

#----- Fabriques -----

@conceptFactory[hshOptions]
  ^use[concept/conceptModule.p]
  $result[^conceptModule::create[$hshOptions]]
